<template>
	<view>
		<u-button :plain="true" @click="buttonClick(item.code)" v-for="(item,index) in dataSource" class="selectButton" :type="item.checked==1?'success':'default'">{{item.name}}</u-button>
	</view>
</template>

<script>
	export default {

		props: {
			name:'',
			dataSource:{}


		},
		created(){
			
			
		},
		data() {
			return {
				
			}
		},
		methods: {
			buttonClick(code) {		
				this.$emit('buttonClickEvent',{name:this.name,code:code})
			}
		}


	}
</script>

<style>
	.selectButton {
		display: inline-block;
		float: left;
		width: 220rpx;
		margin-left: 10rpx;
		margin-right: 10rpx;
		margin-top: 10rpx;
	}
</style>
